﻿using System.Runtime.InteropServices;
using System;

namespace breakoutsharp.utility
{
    public static class Win32
    {
        public const int PM_NOREMOVE = 0;

        [System.Security.SuppressUnmanagedCodeSecurity]
        [System.Runtime.InteropServices.DllImport("User32.dll", CharSet = CharSet.Auto)]
        public static extern bool PeekMessage(
            out peek_message msg,
            IntPtr hWnd,
            uint messageFilterMin,
            uint messageFilterMax,
            uint flags);

        [StructLayout(LayoutKind.Sequential)]
        public struct peek_message
        {
            public IntPtr hWnd;
            public IntPtr msg;
            public IntPtr wParam;
            public IntPtr lParam;
            public uint time;
            public System.Drawing.Point p;
        }
    }
}
